<?php 
	require_once('../includes/config.php');
	if(!$_SESSION['user_id'])
	{
		header('Location: login.php');
	}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Control Panel</title>
<link rel="stylesheet" type="text/css" href="templates/style.css" />
<link rel="stylesheet" href="css/pro.css" type="text/css" media="screen" /> 
<script type="text/javascript" src="js/clockp.js"></script>
<script type="text/javascript" src="js/clockh.js"></script> 
<script type="text/javascript" src="js/jquery.js"></script>
			
</head>
<body>
<div id="main_container">

	<div class="header">
    	<div class="logo"><a href="#"><img src="templates/images/logo.png" alt="" title="" border="0" /></a></div>
    
    	<div class="right_header">Welcome Admin | <a href="../index.php">Visit site</a>  | <a href="logout.php" target="_blank" class="logout">Logout</a></div>
    <div id="clock_a"></div>
    </div>
    
    <div class="main_content">  
        <div class="menu">
            <ul>
                <li><a class="current" href="index.php">Admin Home</a></li>
                <li><a href="index.php?view=category">Manage Categories</a></li>
                <li><a href="index.php?view=product">Manage Product</a></li>
                <li><a href="index.php?view=news">Manage News</a></li>
                <li><a href="index.php?view=comment">Manager Comment</a></li>
                <li><a href="index.php?view=setting">Settings</a></li>
            </ul>
        </div>                             
		<div class="center_content">
			<div class="right_content">            
				<?php 
                    switch($_GET['view']){
                        case 'product':
                            include('product.php');
                            break;
                        case 'news':
                            include('news.php');
                            break;
                        case 'category':
                            include('category.php');
                            break;
                        case 'setting':
                            include('settingpage.php');
                            break;
						case 'comment':
							include('comment.php');
							break;
                        default: 
                            include('frontpage.php');
                            break;
                    }
                ?>
			</div><!-- end of right content-->
		</div>  <!--end of center content -->               
    	<div class="clear"></div>
	</div> <!--end of main content-->
	
    <div class="footer">
        <div class="left_footer">Admin Panel | Powered by <a href="http://9sky.info">9sky</a></div>
    </div>
</div>		
</body>
</html>